package base.多线程.扩展JUC.温度传感器类;

import java.util.concurrent.TimeUnit;

public class 测试 {
    public static void main(String[] args) throws InterruptedException {
        TemperatureSensor tem = new TemperatureSensor();
        ReadTemperatureThread readTem = new ReadTemperatureThread(tem);


        Thread t2 = new Thread(readTem);
        t2.start();
        while (true){
            new Thread(tem).start();
            TimeUnit.SECONDS.sleep(3);

        }


    }
}
